//
//  BQMineReceiveController.m
//  BeeQuick
//
//  Created by student on 2017/7/12.
//  Copyright © 2017年 BecomeRich. All rights reserved.
//

#import "BQMineReceiveController.h"
#import "BQMineReceiveHeaderView.h"
#import "BQMineReceiveCell.h"
@interface BQMineReceiveController ()<UITableViewDelegate,UITableViewDataSource>

@end

@implementation BQMineReceiveController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"收货地址";
    [self addTableView];
}

- (void)addTableView{
    UITableView *tableView = [[UITableView alloc]init];
    tableView.delegate = self;
    tableView.dataSource = self;
    tableView.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [tableView registerNib:[UINib nibWithNibName:@"BQMineReceiveCell" bundle:nil] forCellReuseIdentifier:@"BQMineReceiveControllerCell"];
    [self.view addSubview:tableView];
    [tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(0);
        make.leading.trailing.bottom.equalTo(self.view);
    }];
    tableView.tableHeaderView = [[BQMineReceiveHeaderView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 60)];
    tableView.tableFooterView = [UIView new];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
       return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    BQMineReceiveCell *cell = [tableView dequeueReusableCellWithIdentifier:@"BQMineReceiveControllerCell" forIndexPath:indexPath];
//    cell.textLabel.text = @"你好";
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 65;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
}
@end
